<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/3/19
  Time: 16:39
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
    <meta charset="utf-8">
    <title>没饿哦——打造全国顶尖外卖</title>
    <meta name="renderer" content="webkit">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">

    <%--<meta name="baidu-site-verification" content="w6Fl7g6AOW" />--%>

    <link rel="shortcut icon" href="/images/user.ico" type="image/x-icon" />
    <link rel="stylesheet" href="/layui/css/layui.css">
    <link rel="stylesheet" href="/css/user/food.css">
    <link rel="stylesheet" href="/css/user/footer.css">
    <link rel="stylesheet" href="/css/user/header.css">
    <script src="/layui/layui.js"></script>
    <script src="/js/user/food.js"></script>
    <script src="/js/jquery-3.3.1.min.js"></script>
</head>
<body>
<div id="usrid" hidden>${user.userId}</div>
<!-- 主体部分内容 begin -->
<div class="layui-main we-rank">
    <!-- 循环输出所有的榜单列表前10 begin -->
    <div class="we-rank__list">
        <h3 class="title-wrap">
            <img src="http://zr-pic-cdn.zrjhwenhua.com/web/20190627/7a20ff8c98af11e9b7b81866daf63978.png" alt="热卖美食">
            热卖美食
        </h3>
        <div class="book-list">
            <ul class="food-list">
                <!-- 榜单循环 begin -->
                <c:forEach  items="${foodList}" var="list" varStatus="idxStatus">
                    <c:if test="${idxStatus.index == 0}">
                        <li onclick="add(${list.productId})"  class="unfold">
                    </c:if>
                    <c:if test="${idxStatus.index != 0}">
                        <li onclick="add(${list.productId})">
                    </c:if>
                    <div class="we-flex open">
                        <div class="layui-inline book-index"><em>NO.${idxStatus.index+1}</em></div>
                        <div class="layui-inline book-info">
                            <div class="layui-inline book-info__cover">
                                <a href="javascript:void(0);" class="link">
                                    <img src="${list.photo}" alt="${list.productName}">
                                </a>
                            </div>
                            <div class="layui-inline book-info__text">
                                <h3 class="layui-elip">
                                    <a href="javascript:void(0);">${list.productName}</a>
                                </h3>
                                <p class="we-flex author">
                                    <a class="layui-elip" href="javascript:void(0);">${list.productName}店</a>
                                    <em>官方店铺</em>
                                </p>
                                <p class="total">
                                    <img src="/images/icon_iview_red.png" alt="浏览量">
                                    <em>1827</em>
                                </p>
                            </div>
                        </div>
                    </div>
                    <div class="we-flex close">
                        <div class="layui-inline book-index">${idxStatus.index+1}</div>
                        <div class="we-flex layui-inline book-info">
                            <a class="layui-inline name" href="javascript:void(0);" target="_blank">${list.productName}</a>
                            <div class="layui-inline total">
                                <img src="/images/icon_iview_grey.png" alt="浏览量">
                                <em>1827</em>
                            </div>
                        </div>
                    </div>
                    </li>
                </c:forEach>
            </ul>
        </div>
    </div>

    <div class="we-rank__list">
        <h3 class="title-wrap">
            <img src="/images/ran4.png" alt="热卖小吃">
            热卖小吃
        </h3>
        <div class="book-list">
            <ul>
                <!-- 榜单循环 begin -->
                <c:forEach  items="${foodList1}" var="list" varStatus="idxStatus">
                    <c:if test="${idxStatus.index == 0}">
                        <li onclick="add(${list.productId})"  class="unfold">
                    </c:if>
                    <c:if test="${idxStatus.index != 0}">
                        <li onclick="add(${list.productId})">
                    </c:if>
                    <div class="we-flex open">
                        <div class="layui-inline book-index"><em>NO.${idxStatus.index+1}</em></div>
                        <div class="layui-inline book-info">
                            <div class="layui-inline book-info__cover">
                                <a href="javascript:void(0);" class="link">
                                    <img src="${list.photo}" alt="${list.productName}">
                                </a>
                            </div>
                            <div class="layui-inline book-info__text">
                                <h3 class="layui-elip">
                                    <a href="javascript:void(0);">${list.productName}</a>
                                </h3>
                                <p class="we-flex author">
                                    <a class="layui-elip" href="javascript:void(0);">${list.productName}店</a>
                                    <em>官方店铺</em>
                                </p>
                                <p class="total">
                                    <img src="/images/icon_iview_red.png" alt="浏览量">
                                    <em>1827</em>
                                </p>
                            </div>
                        </div>
                    </div>
                    <div class="we-flex close">
                        <div class="layui-inline book-index">${idxStatus.index+1}</div>
                        <div class="we-flex layui-inline book-info">
                            <a class="layui-inline name" href="#" target="_blank">${list.productName}</a>
                            <div class="layui-inline total">
                                <img src="/images/icon_iview_grey.png" alt="浏览量">
                                <em>1827</em>
                            </div>
                        </div>
                    </div>
                    </li>
                </c:forEach>
            </ul>
        </div>
    </div>

    <div class="we-rank__list">
        <h3 class="title-wrap">
            <img src="/images/ran4.png" alt="热卖面食">
            热卖面食
        </h3>
        <div class="book-list">
            <ul>
                <!-- 榜单循环 begin -->
                <c:forEach  items="${foodList2}" var="list" varStatus="idxStatus">
                    <c:if test="${idxStatus.index == 0}">
                        <li onclick="add(${list.productId})"  class="unfold">
                    </c:if>
                    <c:if test="${idxStatus.index != 0}">
                        <li onclick="add(${list.productId})">
                    </c:if>
                    <div class="we-flex open">
                        <div class="layui-inline book-index"><em>NO.${idxStatus.index+1}</em></div>
                        <div class="layui-inline book-info">
                            <div class="layui-inline book-info__cover">
                                <a href="javascript:void(0);" class="link">
                                    <img src="${list.photo}" alt="${list.productName}">
                                </a>
                            </div>
                            <div class="layui-inline book-info__text">
                                <h3 class="layui-elip">
                                    <a href="javascript:void(0);">${list.productName}</a>
                                </h3>
                                <p class="we-flex author">
                                    <a class="layui-elip" href="javascript:void(0);">${list.productName}店</a>
                                    <em>官方店铺</em>
                                </p>
                                <p class="total">
                                    <img src="/images/icon_iview_red.png" alt="浏览量">
                                    <em>1827</em>
                                </p>
                            </div>
                        </div>
                    </div>
                    <div class="we-flex close">
                        <div class="layui-inline book-index">${idxStatus.index+1}</div>
                        <div class="we-flex layui-inline book-info">
                            <a class="layui-inline name" href="#" target="_blank">${list.productName}</a>
                            <div class="layui-inline total">
                                <img src="/images/icon_iview_grey.png" alt="浏览量">
                                <em>1827</em>
                            </div>
                        </div>
                    </div>
                    </li>
                </c:forEach>
            </ul>
        </div>
    </div>

    <div class="we-rank__list">
        <h3 class="title-wrap">
            <img src="/images/ran4.png" alt="热卖烧烤">
            热卖烧烤
        </h3>
        <div class="book-list">
            <ul>
                <!-- 榜单循环 begin -->
                <c:forEach  items="${foodList3}" var="list" varStatus="idxStatus">
                    <c:if test="${idxStatus.index == 0}">
                        <li onclick="add(${list.productId})" class="unfold">
                    </c:if>
                    <c:if test="${idxStatus.index != 0}">
                        <li onclick="add(${list.productId})">
                    </c:if>
                    <div class="we-flex open">
                        <div class="layui-inline book-index"><em>NO.${idxStatus.index+1}</em></div>
                        <div class="layui-inline book-info">
                            <div class="layui-inline book-info__cover">
                                <a href="javascript:void(0);" class="link">
                                    <img src="${list.photo}" alt="${list.productName}">
                                </a>
                            </div>
                            <div class="layui-inline book-info__text">
                                <h3 class="layui-elip">
                                    <a href="javascript:void(0);">${list.productName}</a>
                                </h3>
                                <p class="we-flex author">
                                    <a class="layui-elip" href="javascript:void(0);">${list.productName}店</a>
                                    <em>官方店铺</em>
                                </p>
                                <p class="total">
                                    <img src="/images/icon_iview_red.png" alt="浏览量">
                                    <em>1827</em>
                                </p>
                            </div>
                        </div>
                    </div>
                    <div class="we-flex close">
                        <div class="layui-inline book-index">${idxStatus.index+1}</div>
                        <div class="we-flex layui-inline book-info">
                            <a class="layui-inline name" href="#" target="_blank">${list.productName}</a>
                            <div class="layui-inline total">
                                <img src="/images/icon_iview_grey.png" alt="浏览量">
                                <em>1827</em>
                            </div>
                        </div>
                    </div>
                    </li>
                </c:forEach>
            </ul>
        </div>
    </div>

    <!-- 循环输出所有的榜单列表前10 end -->

    <%-- 添加或者修改弹出框开始 --%>
    <div style="display: none" id="addOrUpdateDiv">
        <form class="layui-form" lay-filter="dataFrm" id="dataFrm">

            <div class="layui-form-item">
                <div class="layui-inline" id="d1" >
                    <label class="layui-form-label" style="margin-top: 40px">商品图片:</label>
                    <div class="layui-input-inline" style="padding: 5px;margin-top: 50px;">
                        <img id="i1" style="width: 200px" >
                    </div>

                </div>

                <div class="layui-inline" id="d2" style="margin-top: 50px">
                    <div>
                        <label class="layui-form-label">商品描述:</label>
                        <label style="width: 180px;" class="layui-form-label" id="l1" title="这里是描述"></label>
                    </div>
                    <div style="height: 100px" id="id" hidden></div>
                    <div style="height: 100px" ></div>
                    <div style="margin-top: 50px">
                        <label class="layui-form-label">商品价格:</label>
                        <label class="layui-form-label" id="l2" title="这里是价格"></label>
                    </div>
                    <div>
                        <label class="layui-form-label">购买数量:</label>
                        <input  type="number" name="count" id="count" autocomplete="off" class="layui-input layui-input-inline"
                                placeholder="请输入购买数量" style="height: 28px;border-radius: 10px" lay-verify="required">
                        <%--<label class="layui-form-label" id="l3">这里是数量</label>--%>
                    </div>
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-input-block" style="text-align: center;padding-right: 120px">
                    <button type="button" onclick="sub()"
                            class="layui-btn layui-btn-normal layui-btn-md layui-icon  layui-btn-radius"
                            lay-filter="doSubmit" lay-submit="">添加到购物车
                    </button>
                    <button type="reset"
                            class="layui-btn layui-btn-warm layui-btn-md layui-icon  layui-btn-radius">重置
                    </button>
                </div>
            </div>
        </form>
    </div>
    <%-- 添加或者修改弹出框结束 --%>
</div>
<!-- 底部 Footer begin -->

</body>
</html>
